package com.xdtech.trans.service;

import java.util.List;

import com.xdtech.common.service.IBaseService;
import com.xdtech.trans.model.TransAccount;
import com.xdtech.trans.model.TransOrder;
import com.xdtech.trans.vo.TransOrderItem;

/**
 * 
 * @author max.zheng
 * @create 2015-05-26 21:56:45
 * @since 1.0
 * @see
 */
public interface TransOrderService extends IBaseService<TransOrder>{

	/**
	 * 保存更新信息
	 * @author max.zheng
	 * @create 2015-05-26 21:56:45
	 * @modified by
	 * @param item
	 * @return
	 */
	boolean saveOrUpdateTransOrder(TransOrderItem item);

	/**
	 * 加载记录信息
	 * @author max.zheng
	 * @create 2015-05-26 21:56:45
	 * @modified by
	 * @param newId
	 * @return
	 */
	TransOrderItem loadTransOrderItem(Long transOrderId);

	/**
	 * 根据id号删除记录信息
	 * @author max.zheng
	 * @create 2015-05-26 21:56:45
	 * @modified by
	 * @param id
	 * @return
	 */
	boolean deleteTransOrderInfo(long id);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-05-26 21:56:45
	 * @modified by
	 * @param transOrderIds
	 */
	boolean deleteTransOrderInfo(List<Long> transOrderIds);
	
	/**
	 * 加载vo列表条目
	 * @author max.zheng
	 * @create 2015-05-26 21:56:45
	 * @modified by
	 * @return
	 */
	List<TransOrderItem> loadItems();

	/**
	 * 根据运单号加载运单信息
	 * @author max.zheng
	 * @create 2015-6-9下午9:54:28
	 * @modified by
	 * @param orderNo
	 * @return
	 */
	TransOrderItem loadTransOrderItemByOrderNo(String orderNo);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-6-10下午10:33:00
	 * @modified by
	 * @param orderNo
	 * @return
	 */
	TransOrder getOrderByNo(String orderNo);

	/**
	 * 审核运单
	 * @author max.zheng
	 * @since 2015-6-12 下午2:48:55
	 * @param transOrderIds
	 * @return
	 */
	String checkOrders(List<Long> transOrderIds,String operator,Long operatorId);

	/**
	 * 取消审核
	 * @author <a href="max.zheng@zkteco.com">郑志雄</>
	 * @since 2015-6-12 下午5:39:18
	 * @param transOrderIds
	 * @param name
	 * @return
	 */
	String cancleCheckOrders(List<Long> transOrderIds, String name,Long operatorId);

	/**
	 * 更新运单状态
	 * @author max.zheng
	 * @create 2015-6-16下午11:48:53
	 * @modified by
	 * @param orderNo
	 * @param oRDER_STATUS_RETURN
	 */
	void updateOrderStatuByNo(String orderNo, String status);

	/**
	 * 判断运单号是否重复
	 * @author max.zheng
	 * @create 2015-6-19下午11:04:56
	 * @modified by
	 * @param valueOf
	 * @param orderNo
	 * @return
	 */
	boolean checkIsExsit(Long valueOf, String orderNo);

	/**
	 * 
	 * @author <a href="max.zheng@zkteco.com">郑志雄</>
	 * @since 2015-7-6 上午9:26:19
	 * @param valueOf
	 * @return
	 */
	double calculateTotal(Double valueOf);

	/**
	 * app 端保存订单信息；
	 * @author <a href="max.zheng@zkteco.com">郑志雄</>
	 * @since 2015-7-6 上午11:23:13
	 * @param transOrderItem
	 */
	String saveTransOrderWithApp(TransOrderItem transOrderItem);
	
	void handleLinkInfo(TransOrder transOrder,String operator,TransAccount currentTransAccount);

	/**
	 * 核查是否可以删除
	 * @author max.zheng
	 * @create 2015-7-25下午7:55:56
	 * @modified by
	 * @param transOrderScanIds
	 * @return
	 */
	String checkIsCanDel(List<Long> transOrderScanIds);
}
